<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=0, user-scalable=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="format-detection" content="telephone=no">
		<title>申请提现</title>
		<link rel="stylesheet" type="text/css" href="../../Public/css/reset.css" />
		<link rel="stylesheet" type="text/css" href="../../Public/css/main.css" />
		<link rel="stylesheet" type="text/css" href="../../Public/css/my.css" />
		<link rel="stylesheet" type="text/css" href="../../Public/css/list.css">
		<script type="text/javascript" src="../../Public/js/jquery-2.1.4.min.js"></script>
		<script type="text/javascript" src="../../Public/js/rem.js"></script>
		<script type="text/javascript" src="../../Public/js/swiper-3.3.1.jquery.min.js"></script>
	</head>

	<body>
		<!-- head start -->
		<header class="header psa clear bg-color1 bg-color3">
			<span class="back-button" onclick="history.go(-1)">
			<i></i>
			申请提现
		</span>
		</header>
		<!-- head end -->

		<!-- content start -->
		<section class="mt9">
			<div style="padding-bottom:0.4rem;"></div>
			<foreach name="usersBank1" item="vo">
				<div class="select_bank clear">
					<div class="select_bank_img fl">
						<img src="../../Public/images/my/payments1.png" width="100%" height="100%">
					</div>
					<div class="select_bank_description fl">
						<p> 中国建设银行</p>
						<span>尾号：321456342134</span>
					</div>
				</div>
				<div class="select_bank clear">
					<div class="select_bank_img fl">
						<img src="../../Public/images/my/gsyh_img.png" width="100%" height="100%">
					</div>
					<div class="select_bank_description fl">
						<p> 中国工商银行</p>
						<span>尾号：3214231321564</span>
					</div>
				</div>
				<div class="select_bank_add clear">
					<div class="select_bank_img fl">
						<img src="../../Public/images/my/add_icon.png" width="100%" height="100%" />
					</div>
					<div class="select_bank_description_add fl">
						添加银行卡

					</div>

				</div>
			</foreach>

			<ul class="set_password balance_payments_input">
				<li class="set_password_item">
					可用积分：<span style="color: #FF6E26;">10</span>积分
					<span class="fr all_withdrawal" style="color: #00A1CB;">全部提现</span>

				</li>
			</ul>
			<ul class="set_password balance_payments_input">
				<li class="set_password_item">
					提现积分
					<input class="set_password_input byzkshuzhi" type="text" name="money" id="money" placeholder="请输入提现积分" />
				</li>
			</ul>
			<ul class="set_password balance_payments_input">
				<li class="set_password_item">
					手续费 ：3积分
				</li>
			</ul>
			<ul class="set_password balance_payments_input">
				<li class="set_password_item">
					实际到帐积分： 7积分
				</li>
			</ul>

			<input class="info-perf-button set_password_btn" type="button" name="" value="确认提现" />

		</section>
		<!-- content end -->

		<!-- setHead start -->
		<div class="setHead_mask">
			<div class="select_payment_close"><i>×</i>选择提现方式</div>
			<foreach name="usersBank1" item="vo" class='select_payment'>
				<div class="select_bank clear">
					<div class="select_bank_img fl">
						<img src="../../Public/images/my/payments1.png" width="100%" height="100%">
					</div>
					<div class="select_bank_description fl">
						<p> 中国建设银行</p>
						<span>尾号：321456342134</span>
					</div>
				</div>
				<div class="select_bank clear">
					<div class="select_bank_img fl">
						<img src="../../Public/images/my/gsyh_img.png" width="100%" height="100%">
					</div>
					<div class="select_bank_description fl">
						<p> 中国工商银行</p>
						<span>尾号：3214231321564</span>
					</div>
				</div>
				<div class="select_bank_add clear">
					<div class="select_bank_img fl">
						<img src="../../Public/images/my/add_icon.png" width="100%" height="100%" />
					</div>
					<div class="select_bank_description_add fl">
						添加银行卡

					</div>

				</div>
				
			</foreach>
		</div>
		<!-- setHead end  -->

		<script type="text/javascript">
			var isEv = /Mobile/.test(window.navigator.userAgent);
			var touchstart = "";
			var touchstart = isEv ? "touchstart" : "mousedown";
			var touchend = isEv ? "touchend" : "mouseup";

			//当提现金额大于或等于1元，激活提现按钮
			$(".set_password_input").keyup(function() {
				var val = $(this).val();
				if(val >= 1) {
					$(".set_password_btn").removeClass('ok_withdrawals');
				} else {
					$(".set_password_btn").addClass('ok_withdrawals');
				};
			});
			//添加银行卡	
			$('.select_bank_add').on(touchstart, function() {
				window.location.href = 'addUserBank.html';
			})
			//选择付款银行卡弹窗事件
			$(".select_bank").on(touchstart, function() {
				$(".setHead_mask").fadeIn(300, function() {
					$(".select_payment_close").css({
						"transform": "translate3d(0,0,0)"
					});
					$(".select_payment").css({
						"transform": "translate3d(0,0,0)"
					});
				});
			});

			//关闭弹窗事件
			$(".select_payment_close i").on(touchstart, function() {
				close_select();
			});

			//关闭弹窗函数
			function close_select() {
				$(".select_payment_close").css({
					"transform": "translate3d(0,9rem,0)"
				});
				$(".select_payment").css({
					"transform": "translate3d(0,9rem,0)"
				});
				setTimeout(function() {
					$(".setHead_mask").fadeOut(300);
				}, 300);
			};

			//		//选择银行卡切回页面更新信息
			//		var bank_src = "";
			//		var bank_name = "";
			//		var bank_des = "";
			//
			//		$(".remove_active").on(touchstart,function(ev){
			//			var Y = ev.clientY||window.event.clientY||ev.originalEvent.changedTouches[0].clientY;
			//
			//			$(this).on(touchend,function(ev){
			//				var evY = ev.clientY||window.event.clientY||ev.originalEvent.changedTouches[0].clientY;
			//				if(Y == evY){
			//					var index = $(this).index();
			//					$(this).addClass("select_active").siblings(".remove_active").removeClass("select_active");
			//					bank_src = $(this).find("img").attr("src");
			//					bank_name = $(this).find("p").text();
			//					bank_des = $(this).find("span").text();
			//					close_select();
			//		
			//					$(".select_bank img").attr("src",bank_src);
			//					$(".select_bank p").text(bank_name);
			//					$(".select_bank span").text(bank_des);
			//				}else{
			//					return;
			//				};
			//			});
			//		});
			//
			//		//点击使用新卡跳转，绑定银行卡
			//		jumpPage($(".setting_item"),"{:U('User/Center/addUserBank')}");
			//
			//	  var withdrawals_fee={$withdrawals_fee||default='0'};
			//	  var balance={$user.balance|default='0'};
			//	 $(function(){
			//
			//			$('.withdrawal_btn').on("click",function(){
			//			    var money=$('#money').val();
			//				var bank=$("input[name='bank']:checked").val();
			//				if(bank=='' || typeof(bank) == "undefined"){
			//				  layer.msg("请选择提现银行卡！");
			//				}else if(money==''){
			//				 layer.msg("请输入提现金额！");
			//				}else{
			//				  if(balance<money){
			//			         layer.msg("您的可用余额不足！");
			//				  }else{
			//				     $.ajax({
			//					     url:"{:U('user/Center/Withdrawals')}",
			//						   type: "POST",
			//						   data: {bank_id:bank,money:money},
			//						   async:false,
			//						   success: function(data){
			//								  if(data.status==1){
			//									  layer.msg(data.info, function(){
			//										 window.location.reload();
			//									  }); 
			//								  }else{
			//									 layer.msg(data.info);
			//								  }
			//						   }
			//					 });
			//				      
			//				  }
			//				}
			//			});
			//			$('.all_withdrawal').on("click",function(){
			//			        $('#money').val(balance);
			//					$('.Arrival').html(balance-withdrawals_fee);  
			//			});
			//			 $("#money").keyup(function(){     
			//					var tmptxt=$(this).val();   
			//					$('.Arrival').html(tmptxt-withdrawals_fee);  
			//			 }).bind("paste",function(){     
			//					var tmptxt=$(this).val();     
			//					$('.Arrival').html(tmptxt-withdrawals_fee);  
			//			 }); 
			//			
			//	 });
		</script>

	</body>

</html>